﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Jzy.Model.Mail
{
    public partial class MailUserInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "MailUser";
        }
        public override string GetInsertSql()
        {
            return "insert into MailUser ( [ID], [MailID], [UserID], [FolderID], [Status]) values ( @ID, @MailID, @UserID, @FolderID, @Status)";
        }
        public override string GetUpdateSql()
        {
            return "update MailUser set  [ID] = @ID, [MailID] = @MailID, [UserID] = @UserID, [FolderID] = @FolderID, [Status] = @Status where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public Guid ID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 MailID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 UserID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 FolderID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 Status
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Guid)value;
                    break;
                case "mailid":
                    this.MailID = (Int32)value;
                    break;
                case "userid":
                    this.UserID = (Int32)value;
                    break;
                case "folderid":
                    this.FolderID = (Int32)value;
                    break;
                case "status":
                    this.Status = (Int32)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "mailid":
                    return this.MailID;
                case "userid":
                    return this.UserID;
                case "folderid":
                    return this.FolderID;
                case "status":
                    return this.Status;
                default:
                    return null;
            }
        }
    }


}
